import { BaseEntity } from '@cool-midway/core';
import { Column, Entity, Index } from 'typeorm';

/**
 * pushTemplate模块-推送模板信息
 */
@Entity('push_template')
export class PushTemplateEntity extends BaseEntity {
  @Index()
  @Column({ comment: '模板名称' })
  name: string;

  @Index()
  @Column({ comment: '用户ID' })
  userId: number;

  @Column({ comment: '标题' })
  title: string;

  @Column({ comment: '内容' })
  content: string;

  @Column({ comment: '图标URL', nullable: true })
  iconUrl: string;

  @Column({ comment: '图片URL', nullable: true })
  imgUrl: string;

  @Column({ comment: '按钮1名称', nullable: true })
  btnName1: string;

  @Column({ comment: '按钮2名称', nullable: true })
  btnName2: string;

  @Column({ comment: '按钮1跳转URL', nullable: true })
  btnJumpUrl1: string;

  @Column({ comment: '按钮2跳转URL', nullable: true })
  btnJumpUrl2: string;

  @Column({ comment: '创建时间', type: 'datetime' })
  createTime: Date;

  @Column({ comment: '更新时间', type: 'datetime' })
  updateTime: Date;
}
